package hn.cch;

import hn.cch.bean.Bean;
import hn.cch.constant.Path;
import hn.cch.http.HttpServer;
import org.apache.log4j.PropertyConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class App {
    private static Logger logger = LoggerFactory.getLogger(App.class);

    public static void main(String[] args) {

        //加载log4j
        PropertyConfigurator.configure(Path.LOG_PATH);
        //加载spring
        Bean.newBean(Path.BEAN_PATH);

        logger.info("access main start");

        //启动服务
        HttpServer httpServer = new HttpServer(Path.access_server_port);
        Thread thread = new Thread(httpServer);
        logger.info("access server start");
        thread.start();
        logger.info("access server success");

        logger.info("access main success");





    }
}
